import service from "@/utils/request";
import type { Response, PageResponse, CodeName, ListResponse } from "@/types/common";
export const useAttendPointPageApi = (params: object) => {
  return service({
    url: `/v1/attend/point/page`,
    method: "GET",
    params,
  });
};

export const useAttendPointQueryApi = (params: object) => {
  return service({
    url: `/v1/attend/point/query`,
    method: "GET",
    params,
  });
};

export const useAttendPointListApi = () => {
  return service<any, ListResponse<CodeName>>({
    url: `/v1/attend/point/list`,
    method: "GET",
  });
};

export const useAttendPointCreateApi = (data: object) => {
  return service<any, Response<PageResponse<CodeName>>>({
    url: `/v1/attend/point/create`,
    method: "POST",
    data,
  });
};

export const useAttendPointUpdateApi = (data: object) => {
  return service<any, Response<CodeName>>({
    url: `/v1/attend/point/update`,
    method: "POST",
    data,
  });
};

export const useAttendPointDeleteApi = (data: object) => {
  return service({
    url: `/v1/attend/point/delete`,
    method: "DELETE",
    data,
  });
};
